<!DOCTYPE html>
<html lang="zh-CN">
  <head>  
    <meta charset="UTF-8">  
    <title>练习2</title>  
    <style type="text/css">  
  
        table {  
            width: 500px; 
            border-collapse: collapse; 
            margin: 20px auto;  
        }  
  
      
        th {  
            background-color: #6f84ec; 
            border: 1px solid #000; 
            padding: 8px; 
            text-align: left;  
        }  
  
 
        td {  
            border: 1px solid #000;  
            padding: 8px; 
            text-align: left; 
        }  
  

        caption {  
            caption-side: top;   
            font-size: 1.5em;  
            font-weight: bold; 
            margin-bottom: 10px;   
        }  
        tr {
          background-color: #aaabad;
        }
        tr:nth-child(odd) {  
            background-color: #b2c6ee;  
        }   
    </style>  
</head>  

  <body>
    <table>
      <caption>
        名单
      </caption>
      <tr>
        <th>号码</th>
        <th>姓名</th>
      </tr>
      <tr>
        <td>003</td>
        <td>张三</td>
      </tr>
      <tr>
        <td>004</td>
        <td>李四</td>
      </tr>
      <tr>
        <td>005</td>
        <td>王五</td>
      </tr>
      <tr>
        <td>006</td>
        <td>赵六</td>
      </tr>
      <tr>
        <td>007</td>
        <td>钱七</td>
      </tr>
      <tr>
        <td>008</td>
        <td>孙八</td>
      </tr>
    </table>
  </body>
</html>
